<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style>


		/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
		::-webkit-scrollbar{
			width: 5px;
			height: 5px;
			background-color: #F5F5F5;
		}

		/*定义滚动条轨道 内阴影+圆角*/
		::-webkit-scrollbar-track {
			box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
			-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
			border-radius: 10px;
			background-color: #F5F5F5;
		}

		/*定义滑块 内阴影+圆角*/
		::-webkit-scrollbar-thumb{
			border-radius: 10px;
			box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
			-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
			/*滚动条的颜色*/
			background-color: #7554c8;
		}





		html,body{
			width: 100%;
			height: 100%;
		}
		*{
			padding: 0;
			margin: 0;
		}
		.preview_main_page{
			display: flex;
			width:100%;
			height:100%;
			flex-direction:column;
		}

		/*场景部分*/
		.preview_main_page_center{
			height:100%;
			flex-grow:1;
			display: flex;
			justify-content:safe center;
			align-items: center;
			overflow:auto;
		}
	</style>
	<!--layui框架-->
	<link rel="stylesheet" href="js/plugIn/layui-master/src/css/layui.css">
	<script src="js/plugIn/jquery/jquery.min.js"></script><!--jquery 要在layui之前，这样layui就不会加载内部的jquery-->
	<script src="js/plugIn/layui-master/src/layui.js"></script>

	<script src="config/InitConfig.js"></script>
	<script src="js/common/tool.js"></script>
</head>
<body>
<div class="preview_main_page">
	<div class="preview_main_page_center">

		<form class="layui-form" action="#" id="hardwareform"  lay-filter="hardwareform">

			        <div class="layui-form-item">
                        <label class="layui-form-label">模板名称</label>
                        <div class="layui-input-inline">
							<input type="text" id = "moduleName" name="moduleName" lay-verType="tips" lay-reqtext="模板名称不能为空" lay-verify="required" autocomplete="off" placeholder="请输入画面模板名称" class="layui-input">
                        </div>
                    </div>

			<div class="layui-form-item">
			    <div class="layui-input-block">
					<button lay-submit lay-filter="SubmitName" class="layui-btn" >确定</button>
					<input type="button" onclick="cancel()" class="layui-btn layui-btn-warm" value="取消" />
				</div>
			</div>

		</form>



	</div>



</div>
</body>
<script>
	var index = parent.layer.getFrameIndex(window.name);

	layui.use(['form'], function(){
		var form = layui.form;
		var stageModuleName = $_GET.stageModuleName;
		var stageModuleNameT= decodeURIComponent(stageModuleName);
		$("#moduleName").val(stageModuleNameT);
		//监听提交
		form.on('submit(SubmitName)', function(data){
			okClick();
			return false;
		});

		});
	//点击确认按钮
	function okClick(){

		var stageModuleName =$("#moduleName").val();
		parent.stageModuleName=stageModuleName;
		parent.isCancel=1;
		parent.layer.close(index);
	}
	function cancel(){
		parent.isCancel=0;
		parent.layer.close(index);
	}


</script>
</html>
